export default class Storage {
    static getStorageSync(key, defaultValue) {
        return wx.getStorageSync(key) || defaultValue;
    }
    static setStorageSync(key, value) {
        return wx.setStorageSync(key, value);
    }

    static removeStorageSync(key) {
        return wx.removeStorageSync(key);
    }

    static getStorage(key, cb) {
        return wx.getStorage({
            key: key,
            success: cb
        });
    }
    static setStorage(key, value) {
        return wx.setStorage({
            key: key,
            data: value
        });
    }

    static removeStorage(key) {
        return wx.removeStorage({
            key: key
        });
    }
}